package think.in.spring.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import think.in.spring.ioc.overview.domain.User;

/**
 * 方法注入
 */
@Configuration
@ComponentScan("think.in.spring.bean")
public class MethodDependencyInjectionConfig {

    @Bean
    public User user() {
        User user = new User();
        user.setName("小仓鼠");
        user.setId(11111L);
        return user;
    }
}
